<?php

class          Common_DataTable_Model_KeyValues
    extends    Common_DataTable_Model_Array
{

    public function __construct($data) {

        $standardisedData = $this->standardiseData($data);

        parent::__construct($standardisedData);

    }

    public function standardiseData($arr_data) {

        $standardisedData = array();

        if(is_array($arr_data)) {

            $standardisedData = array();
            foreach ($arr_data as $key => $value) {
                $standardisedData[$key] = array(
                    'key' => $key,
                    'value' => $value
                );
            }

        }

        return $standardisedData;
    }

}
